﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MINERP.ComControls;
using MINERP.Statistics.Forms;
using DevExpress.XtraNavBar;
using MINERP.Statistics.Forms.NM;
using MINERP.Statistics.Forms.ProfessionalReports;
using MINERP.Statistics.ShopBill;

namespace MINERP.Statistics
{
    public partial class FrmMain : FrmParent
    {
        public static string customerName = string.Empty;
        public static string loginName = string.Empty;
        public FrmMain()
        {
            InitializeComponent();
            base.InitiAuthority();
        }

        ////账单统计
        //private void btnBillPrint_Click(object sender, EventArgs e)
        //{
        //    FrmBill fb = new FrmBill();
        //    AddChild(fb);
        //}

        ////拼版面积统计
        //private void btnPinBan_Click(object sender, EventArgs e)
        //{
        //    Forms.FrmWaste fw = new MINERP.Statistics.Forms.FrmWaste();
        //    AddChild(fw);
        //}

        #region 加子窗体
        /// <summary>
        /// 加子窗体
        /// </summary>
        /// <param name="childForm"></param>
        private void AddChild(Form childForm)
        {
            if (this.MdiChildren.Length != 0)
            {
                this.MdiChildren[0].Dispose();
            }
            childForm.MdiParent = this;
            childForm.WindowState = FormWindowState.Maximized;
            childForm.Show();
        }
        #endregion
        //拼版面积统计
        private void navBarPinBan_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            //Forms.FrmWaste fw = new MINERP.Statistics.Forms.FrmWaste();
            //AddChild(fw);
            FrmWaste frm = FrmWaste.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }
        //账单统计
        private void navBarBillPrint_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            //FrmBill fb = new FrmBill();
            //AddChild(fb);
            FrmBill frm = FrmBill.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarFinance_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmFinance frmFinance = FrmFinance.GetInstance;
            frmFinance.MdiParent = this;
            frmFinance.WindowState = FormWindowState.Maximized;
            frmFinance.Show();
        }

        private void navBarItem1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmBillEdit frm = FrmBillEdit.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;

            frm.Show();
        }

        private void navBarItem2_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmWaste frm = FrmWaste.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;

            frm.Show();
        }


        //欠款账单明细报表(某个商户，某段时间内，未结单的账单明细)
        private void navBarItem3_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ShopBill.FrmOneShopBillDetail frm = ShopBill.FrmOneShopBillDetail.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        //账单明细报表(某个商户，一段时间内，所有账单明细)
        private void navBarItem4_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ShopBill.FrmOneShopAllBillDetail frm = ShopBill.FrmOneShopAllBillDetail.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        //商户欠款报表(所有商户一段时间所有未结单总额)
        private void navBarItem5_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ShopBill.FrmShopBillNoPay frm = ShopBill.FrmShopBillNoPay.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        //产品统计报表(某段时间，所有产品的统计)
        private void navBarItem6_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ShopBill.FrmProductPrice frm = ShopBill.FrmProductPrice.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            MINERP.COM.Logoff.ShowMainFrm();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            loginName = userName;
            //foreach (Control item in this.Controls)
            //{
            if (ControlsName != null)
            {
                foreach (var ControlName in ControlsName)
                {
                    if (navBarItem10.Name == ControlName)
                    {
                        navBarItem10.Visible = false;
                        continue;
                    }
                    //if (navBarItem6.Name == ControlName)
                    //{
                    //    navBarItem6.Visible = false;
                    //    continue;
                    //}
                    //if (navBarItem5.Name == ControlName)
                    //{
                    //    navBarItem5.Visible = false;
                    //    continue;
                    //}
                    //if (navBarItem4.Name == ControlName)
                    //{
                    //    navBarItem4.Visible = false;
                    //    continue;
                    //}
                    if (navBarItem3.Name == ControlName)
                    {
                        navBarItem3.Visible = false;
                        continue;
                    }
                    //if (navBarBillPrint.Name == ControlName)
                    //{
                    //    navBarBillPrint.Visible = false;
                    //    continue;
                    //}
                    //if (navBarPinBan.Name == ControlName)
                    //{
                    //    navBarPinBan.Visible = false;
                    //    continue;
                    //}
                    //if (navBarItem2.Name == ControlName)
                    //{
                    //    navBarItem2.Visible = false;
                    //    continue;
                    //}
                    if (navBarItem7.Name == ControlName)
                    {
                        navBarItem7.Visible = false;
                        continue;
                    }
                    if (navBarItem8.Name == ControlName)
                    {
                        navBarItem8.Visible = false;
                        continue;
                    }
                    //if (navBarItem11.Name == ControlName)
                    //{
                    //    navBarItem11.Visible = false;
                    //    continue;
                    //}
                    if (navBarFinance.Name == ControlName)
                    {
                        navBarFinance.Visible = false;
                        continue;
                    }
                    if (navBarItem1.Name == ControlName)
                    {
                        navBarItem1.Visible = false;
                        continue;
                    }
                    if (navBarItem12.Name == ControlName)
                    {
                        navBarItem12.Visible = false;
                        continue;
                    }
                    if (navBarItem13.Name == ControlName)
                    {
                        navBarItem13.Visible = false;
                        continue;
                    }
                }
            }
            //}

        }

        private void navBarItem7_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmProductStat frm = new FrmProductStat();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem8_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmPrintMJ frm = new FrmPrintMJ();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem9_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmCheckBill frm = new FrmCheckBill();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        //账单索引
        private void navBarItem10_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ShopBill.FrmShopBillIndex si = ShopBill.FrmShopBillIndex.GetInstance;
            si.MdiParent = this;
            si.WindowState = FormWindowState.Maximized;
            si.Show();
        }

        //委外商产品统计
        private void navBarItem11_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmOutProductStat frm = new FrmOutProductStat();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem12_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmShopAccountMove frm = new FrmShopAccountMove();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem13_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            FrmSalesAchievementStat frm = new FrmSalesAchievementStat();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        //商户欠款统计(可导航)
        private void navBarItem14_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            ShopBill.FrmShopNoPay frm = ShopBill.FrmShopNoPay.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem15_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            //FrmInnerStat frm = new FrmInnerStat();
            FrmNewInnerReturnStat frm = FrmNewInnerReturnStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem3_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesAchievementStat frm = new FrmSalesAchievementStat();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem5_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmProductStat frm = new FrmProductStat();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem7_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            ShopBill.FrmShopNoPay frm = ShopBill.FrmShopNoPay.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem13_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            //ShopBill.FrmShopBillIndex si = ShopBill.FrmShopBillIndex.GetInstance;
            FrmShopBillIndex2 si = FrmShopBillIndex2.GetInstance;
            si.MdiParent = this;
            si.WindowState = FormWindowState.Maximized;
            si.Show();
        }

        private void navBarItem10_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            ShopBill.FrmOneShopAllBillDetail frm = ShopBill.FrmOneShopAllBillDetail.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem4_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {

            FrmOutReturn frm = FrmOutReturn.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem14_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmPrintPaper frm = FrmPrintPaper.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem18_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            //打开设计
            FrmDesignerUserStat frm = FrmDesignerUserStat.GetInstance;
            frm.MdiParent = this;
            frm.Show();
        }

        private void navBarItem16_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmWaste frm = FrmWaste.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem17_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmPerformance frm = FrmPerformance.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;

            frm.Show();
        }



        private void navBarItem20_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmShopCrushAndArrears frm = FrmShopCrushAndArrears.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem21_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmAlarmMessage frm = FrmAlarmMessage.GetInstance;
            frm.UserId = base.userId;
            frm.OnlyShowNoRead = false;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem22_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalemanAchievement frm = FrmSalemanAchievement.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem23_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopBill frm = FrmOutShopBill.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem24_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopBillEdit frm = FrmOutShopBillEdit.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem25_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopBillPay frm = FrmOutShopBillPay.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem26_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmComPerf frm = FrmComPerf.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem27_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmProductCount frm = FrmProductCount.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem28_LinkClicked(object sender, NavBarLinkEventArgs e)
        {

            FrmShopProductCount frm = FrmShopProductCount.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem29_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopProductStat frm = FrmOutShopProductStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem30_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmAlarmMessage frm = FrmAlarmMessage.GetInstance;
            frm.UserId = base.userId;
            frm.OnlyShowNoRead = false;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem21_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            //入库管理

        }

        private void navBarItem33_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            Frm应收汇总表 frm = Frm应收汇总表.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem35_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmShopProductPrice frm = FrmShopProductPrice.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem34_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmNewPerformance2 frm = FrmNewPerformance2.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }



        private void navBarItemProductInfotiom_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmProductInfomation frm = FrmProductInfomation.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }


        //定制报表，销售统计
        private void navBarItem36_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesStatistics frm = FrmSalesStatistics.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem4_LinkClicked_2(object sender, NavBarLinkEventArgs e)
        {
            //客户账单索引

            ShopBill.FrmShopBillIndex si = ShopBill.FrmShopBillIndex.GetInstance;
            si.MdiParent = this;
            si.WindowState = FormWindowState.Maximized;
            si.Show();
        }

        private void navBarItem5_LinkClicked_2(object sender, NavBarLinkEventArgs e)
        {
            FrmShopProductPriceForFuji frm = FrmShopProductPriceForFuji.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        //外部返单
        private void navBarItem6_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmOutReturnQuery frm = FrmOutReturnQuery.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem9_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmProdcutStatistcs frm = FrmProdcutStatistcs.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem11_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmFujiInnerProuctCount frm = FrmFujiInnerProuctCount.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItemFahuoyuanyeji_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmDeliveryStat frm = FrmDeliveryStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItemSalesman_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesman frm = FrmSalesman.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItemsalesmanOutrenturn_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmNewOutReturnQuery frm = FrmNewOutReturnQuery.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItemUncompleteProductPrice_ItemChanged(object sender, EventArgs e)
        {
            
        }

        private void navBarItemUncompleteProductPrice_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmUnCompleteCount frm = FrmUnCompleteCount.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void salesmanFundsMove_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesmanAccountMove frm = new FrmSalesmanAccountMove();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem14_LinkClicked_2(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesmanCrushAndArrears frm = new FrmSalesmanCrushAndArrears();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem16_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmPerformance2 frm = FrmPerformance2.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem17_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmsShopPrintStatis frm = FrmsShopPrintStatis.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem26_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmShopSalesStatistics frm = FrmShopSalesStatistics.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();

        }

        private void navBarItem27_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmPerformance3 frm = FrmPerformance3.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem28_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesStat frm = FrmSalesStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem37_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmPerformanceByPhotoSpec frm = FrmPerformanceByPhotoSpec.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem42_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            Frm应收汇总表 frm = Frm应收汇总表.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem43_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesman frm = FrmSalesman.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem44_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesmanAccountMove frm = new FrmSalesmanAccountMove();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem45_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesmanCrushAndArrears frm = new FrmSalesmanCrushAndArrears();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem46_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopBill frm = FrmOutShopBill.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem47_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopBillEdit frm = FrmOutShopBillEdit.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem48_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopBillPay frm = FrmOutShopBillPay.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem50_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesStatistics frm = FrmSalesStatistics.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem51_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmShopProductPriceForFuji frm = FrmShopProductPriceForFuji.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem52_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmNewOutReturnQuery frm = FrmNewOutReturnQuery.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem53_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmUnCompleteCount frm = FrmUnCompleteCount.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem54_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmsShopPrintStatis frm = FrmsShopPrintStatis.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem55_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmShopSalesStatistics frm = FrmShopSalesStatistics.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem56_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmSalesStat frm = FrmSalesStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem57_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutReturnQuery frm = FrmOutReturnQuery.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem58_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmOutShopProductStat frm = FrmOutShopProductStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem59_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmBillStatistics frm = FrmBillStatistics.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem49_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmDesignerUserStat frm = FrmDesignerUserStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem60_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmBoardStat frm = FrmBoardStat.GetInstance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        /// <summary>
        /// 完成品发送通知，packinglist，invoice打印
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void navBarItem4_LinkClicked_3(object sender, NavBarLinkEventArgs e)
        {
            FrmInvoice frm = FrmInvoice.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void navBarItem35_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {

            #region 洛阳新华
            //FrmBillStatistics frm = FrmBillStatistics.Instance;
            //frm.MdiParent = this;
            //frm.MdiParent = this;
            //frm.WindowState = FormWindowState.Maximized;
            //frm.Show();
            #endregion
            #region 所有车间适用
            FrmBillProduct frm = FrmBillProduct.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
            #endregion
        }

        private void navBarItem59_LinkClicked_1(object sender, NavBarLinkEventArgs e)
        {
            FrmBillEditRecord frm = FrmBillEditRecord.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();

        }

        private void navBarItem56_LinkPressed(object sender, NavBarLinkEventArgs e)
        {

        }

        private void navBarItem61_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            FrmBillEditRecord frm = FrmBillEditRecord.Instance;
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();

        }

        

    }
}

